<script setup lang="ts">
import TheCommonTable from "../components/the-common-table.vue";
import ebookCategoryService from "../http/EbookCategoryService";

const columns = [
  {
    title: '名称',
    dataIndex: 'name',
    key: 'name'
  }, {
    title: '代码',
    dataIndex: 'code',
    key: 'code'
  }, {
    title: '操作',
    key: 'action'
  }
]

const editingForm: FormItem[] = [
  {
    label: '名称',
    dataIndex: 'name',
    inputType: 'text'
  }, {
    label: '代码',
    dataIndex: 'code',
    inputType: 'text'
  }
]
</script>

<template>
  <the-common-table :service="ebookCategoryService"
                    editing-value-key-name="code"
                    :columns="columns"
                    :editing-form="editingForm">
  </the-common-table>
</template>